home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší hry / Nejlepsi hry.iso / hry / plane arcade / planearcade.exe / tank3.bmp / sound.h < prev    next >
C/C++ Source or Header  |  2004-08-23  |  1KB  |  65 lines

  1.  
  2. #ifndef _SOUND_H_
  3. #define _SOUND_H_
  4.  
  5.  
  6. //-----------------------------------------
  7. //Public variables
  8. //-----------------------------------------
  9. extern ALCcontext *Context;
  10. extern ALCdevice  *Device;
  11.  
  12. //-----------------------------------------
  13. //Public funtions
  14. //-----------------------------------------
  15. void InitializeSound();
  16. void CleanUpSound();
  17.  
  18.  
  19. //------------------------------------------------------------------
  20. // Name: SOUND CLASS
  21. // Desc: ***********
  22. //------------------------------------------------------------------
  23. class SOUND
  24. {
  25.  
  26. private:
  27.     enum Format {Unknown, MP3, WavMidi,WavMidi3D};
  28.  
  29.  
  30.     //MP3
  31.     IGraphBuilder* m_pGraph;
  32.     IMediaControl* m_pMediaControl;
  33.     IMediaPosition* m_pMediaPosition;
  34.  
  35.     //Wav3D
  36.     char*            alBuffer;
  37.     ALenum        alFormatBuffer;
  38.     ALsizei        alFreqBuffer;
  39.     long            alBufferLen;
  40.     unsigned int    alSource;
  41.     unsigned int    alSampleSet;
  42.  
  43.     Format m_enumFormat;
  44.     bool Sound3DEnabled;
  45.  
  46. public:
  47.  
  48.  
  49.     bool Stop();
  50.     bool Play(bool Loop = false);
  51.     void SetPosition(VECTOR3D Point,float Scale);
  52.     bool LoadSound(char* szSoundFilePath);
  53.     void InitialiseForWavMidi();
  54.     void InitialiseForWavMidi3D();
  55.     void InitialiseForMP3();
  56.     
  57.     SOUND();                
  58.     virtual ~SOUND();
  59.  
  60. };
  61.  
  62.  
  63.  
  64.  
  65. #endif //_SOUND_H_